<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<div class="table-scrollable">
	<div style="margin-top: 30px;"></div>
	<table class="table table-striped table-hover table-info">
		<thead>
			<tr>
				<th>全选</th>
				<th style="width: 20%;">产品名称</th>
				<th style="width: 20%;">我司货号</th>
				<th>仓库</th>
				<th>分类</th>
				<th>库存统计</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page.result}" var="stock" varStatus="vs">
				<tr>
					<td><input type="checkbox"></input></td>
					<td class="showTd"><c:choose>
							<c:when test="${fn:length(stock.product.name)>20 }">
							  ${fn:substring(stock.product.name, 0, 20)}... 
							  <!-- 隐藏DIV -->
								<div class="modal-content div-hidden">${stock.product.name }</div>
							</c:when>
							<c:otherwise>
							${stock.product.name}
						</c:otherwise>
						</c:choose></td>
					<td>${stock.product.code }</td>
					<td>${stock.warehouse.name }</td>
					<td>${stock.product.productType.name }</td>
					<td>${stock.stockNum }</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
</div>
<div class="pageination-panel">${page}</div>
<script>
	$('.div-hidden').hide();
	$(".showTd").mouseleave(function() {
		$(this).find('div').hide();
	})
	$(".showTd").mouseover(function() {
		//alert($(this).find('div').html());
		$(this).find('div').show();
	});
</script>